.class final Lcom/greystripe/sdk/aj;
.super Lcom/greystripe/sdk/w;

# interfaces
.implements Landroid/media/MediaPlayer$OnErrorListener;


# instance fields
.field private b:Lcom/greystripe/sdk/am;

.field private c:Landroid/view/View;


# direct methods
.method public constructor <init>(Lcom/greystripe/sdk/c;)V
    .locals 0

    invoke-direct {p0, p1}, Lcom/greystripe/sdk/w;-><init>(Lcom/greystripe/sdk/c;)V

    return-void
.end method

.method static synthetic a(Lcom/greystripe/sdk/aj;)Lcom/greystripe/sdk/am;
    .locals 1

    iget-object v0, p0, Lcom/greystripe/sdk/aj;->b:Lcom/greystripe/sdk/am;

    return-object v0
.end method

.method private a()V
    .locals 2

    iget-object v0, p0, Lcom/greystripe/sdk/aj;->b:Lcom/greystripe/sdk/am;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/greystripe/sdk/aj;->b:Lcom/greystripe/sdk/am;

    invoke-virtual {v0}, Lcom/greystripe/sdk/am;->removeAllViews()V

    iget-object v0, p0, Lcom/greystripe/sdk/aj;->b:Lcom/greystripe/sdk/am;

    iget-object v1, p0, Lcom/greystripe/sdk/aj;->c:Landroid/view/View;

    invoke-virtual {v0, v1}, Lcom/greystripe/sdk/am;->addView(Landroid/view/View;)V

    :cond_0
    iget-object v0, p0, Lcom/greystripe/sdk/aj;->a:Lcom/greystripe/sdk/y;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/greystripe/sdk/aj;->a:Lcom/greystripe/sdk/y;

    invoke-virtual {v0, p0}, Lcom/greystripe/sdk/y;->b(Lcom/greystripe/sdk/x;)V

    :cond_1
    return-void
.end method

.method static synthetic b(Lcom/greystripe/sdk/aj;)V
    .locals 0

    invoke-direct {p0}, Lcom/greystripe/sdk/aj;->a()V

    return-void
.end method


# virtual methods
.method public final onCompletion()V
    .locals 1
    .annotation runtime Landroid/webkit/JavascriptInterface;
    .end annotation

    invoke-super {p0}, Lcom/greystripe/sdk/w;->onCompletion()V

    new-instance v0, Lcom/greystripe/sdk/al;

    invoke-direct {v0, p0}, Lcom/greystripe/sdk/al;-><init>(Lcom/greystripe/sdk/aj;)V

    invoke-static {v0}, Lcom/greystripe/sdk/bm;->a(Ljava/lang/Runnable;)Z

    return-void
.end method

.method public final onError(Landroid/media/MediaPlayer;II)Z
    .locals 2
    .annotation runtime Landroid/webkit/JavascriptInterface;
    .end annotation

    const-string v0, "Video cannot be played."

    const/4 v1, 0x0

    new-array v1, v1, [Ljava/lang/Object;

    invoke-static {v0, v1}, Lcom/greystripe/sdk/bd;->b(Ljava/lang/String;[Ljava/lang/Object;)V

    invoke-direct {p0}, Lcom/greystripe/sdk/aj;->a()V

    const/4 v0, 0x1

    return v0
.end method

.method public final play(Ljava/lang/String;)V
    .locals 2
    .annotation runtime Landroid/webkit/JavascriptInterface;
    .end annotation

    const/4 v1, 0x0

    iget-object v0, p0, Lcom/greystripe/sdk/aj;->b:Lcom/greystripe/sdk/am;

    if-nez v0, :cond_0

    const-string v0, "Banner view was not set"

    new-array v1, v1, [Ljava/lang/Object;

    invoke-static {v0, v1}, Lcom/greystripe/sdk/bd;->b(Ljava/lang/String;[Ljava/lang/Object;)V

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lcom/greystripe/sdk/aj;->b:Lcom/greystripe/sdk/am;

    invoke-virtual {v0, v1}, Lcom/greystripe/sdk/am;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/greystripe/sdk/aj;->c:Landroid/view/View;

    new-instance v0, Lcom/greystripe/sdk/ak;

    invoke-direct {v0, p0, p1}, Lcom/greystripe/sdk/ak;-><init>(Lcom/greystripe/sdk/aj;Ljava/lang/String;)V

    invoke-static {v0}, Lcom/greystripe/sdk/bm;->a(Ljava/lang/Runnable;)Z

    goto :goto_0
.end method

.method public final setBannerView(Lcom/greystripe/sdk/am;)V
    .locals 0

    iput-object p1, p0, Lcom/greystripe/sdk/aj;->b:Lcom/greystripe/sdk/am;

    return-void
.end method
